import config from "@/config"
import http from "@/utils/request"

export default {
    page: {
        url: `${config.API_URL}/system/user/page`,
        name: "用户分页查询",
        get: async function(params){
            return await http.get(this.url, params);
        }
    },
    save: {
        url: `${config.API_URL}/system/user/save`,
        name: "保存用户",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    deletes: {
        url: `${config.API_URL}/system/user/deletes`,
        name: "批量删除用户",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    updatePassword: {
        url: `${config.API_URL}/system/user/updatePassword`,
        name: "修改账户密码",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    updateAccountInfo: {
        url: `${config.API_URL}/system/user/updateAccountInfo`,
        name: "修改账户信息",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    },
    resetPassword: {
        url: `${config.API_URL}/system/user/resetPassword`,
        name: "重置密码",
        post: async function(data={}){
            return await http.post(this.url, data);
        }
    }
}